package com.itheima.clientAndService01;

import java.io.File;
import java.io.IOException;

public class FileClass03 {
    public static void main(String[] args) throws IOException {
        File file1 = new File("F:\\study\\a");
        boolean result1 = file1.createNewFile();

        File file2 = new File("F:\\study\\aaa");
        boolean result2 = file2.mkdirs();

        boolean result3 = file1.isFile();
        boolean result4 = file2.isDirectory();
        boolean result5 = file1.exists();
        String result6 = file1.getPath();
        String result7 = file2.getAbsolutePath();
        String name1 = file1.getName();
        String name2 = file2.getName();
        boolean result8 = file1.delete();
        boolean result9= file2.delete();
        System.out.println(result1);
        System.out.println(result2);
        System.out.println(result3);
        System.out.println(result4);
        System.out.println(result5);
        System.out.println(result6);
        System.out.println(result7);
        System.out.println(result8);
        System.out.println(result9);
        System.out.println(name1);
        System.out.println(name2);
    }
}
